import request from '../../utils/request'

export function getList(params) {
  return request.ajax({
      url: `/mall/bbs/comments/getList`,
      method: 'post',
      params
  })
} 
export function getCount(id) {
  return request.ajax({
      url: `/mall/bbs/comments/getCount/${id}`,
      method: 'post'
  })
}
export function add(params){
  return request.ajax({
    url: `/mall/bbs/comments/add`,
    method: 'post',
    loading:true,
    params
  })
}
export function loadMore(id){
  let params = {maxId:id}
  return request.ajax({
    url: `/mall/bbs/comments/loadMore`,
    method: 'post',
    params
  })
}

//关注/client/mall/bbs/options/followadd
export function followadd(params) {
  return request.ajax({
    url: `/mall/bbs/options/followadd`,
    method: 'post',
    params
  })
}

//取消关注/client/mall/bbs/options/followdel
export function followdel(params) {
  return request.ajax({
    url: `/mall/bbs/options/followdel`,
    method: 'post',
    params
  })
}

//发现中判断用户是否被关注/client/mall/bbs/options/getMineData/72
export function isfollow(id) {
  return request.ajax({
    url: `/mall/bbs/options/getMineData/${id}`,
    method: 'post'
  })
}

//用户中心发现列表/client/member/getMemberList
export function memberList(query) {
  return request.ajax({
    url: `/member/getMemberList?classify=${query.classify}&memberId=${query.id}`,
    method: 'post'
  })
}